home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_c / lsdoor09.zip / SERIAL.H < prev    next >
C/C++ Source or Header  |  1996-04-26  |  954b  |  29 lines

  1. // LightSpeed Standard - Serial Communications - Standard v1.0
  2.  
  3. #ifndef _LSSERIAL_HEADR_
  4. #define _LSSERIAL_HEADR_
  5.  
  6. #define lsTimeout    5
  7.  
  8. truth timed_in( uchar c );       // Looks for c with timeout
  9. int   timed_get( void );         // Waits for input with timeout return -1
  10.  
  11. truth confirm_in( uchar c );     // Looks for and confirms c with timeout
  12. int   confirm_get( void );       // Looks for and confirms input (or -1)
  13. truth confirm_out( uchar c );    // Sends and confirms c
  14.  
  15.   // The following functions (except direct_write) all return the number of
  16.   // bytes actually read or writen successfully.
  17.  
  18. void  direct_write( void *dat, uint len );    // Sends raw data
  19. int   direct_read( void *dat, uint len );     // Recvs raw data with timeout
  20.  
  21. int   confirm_write( void *dat, uchar len );  // Sends data with checksum
  22. int   confirm_read( void *dat, uchar len );   // Recvs data w chksum & tout
  23.  
  24. #endif
  25.  
  26. // End of Serial.H
  27.  
  28.  
  29.